package commands;



import nanoxml.XMLElement;
import utils.ITransmittable;

/**
 * This command represents a client's request for his/her  
 *  games statistics.

 */
public class CommandBringStatistics implements ITransmittable {
    
    private final static String ATTR_USER_NAME = "Username";
    private String username = null;


    public CommandBringStatistics (String username) {
    	this.username = username;
    }
    
    public CommandBringStatistics (XMLElement command) {
		this.username = (String) command.getAttribute(ATTR_USER_NAME);	
	}
   	
    @Override
	public XMLElement toXML () {
		XMLElement element = new XMLElement();
		element.setName(Commands.BRING_STATISTICS);
		element.setAttribute(ATTR_USER_NAME, username);
		return element;
	}


    public String getUsername() {
        return username;
    }
 
    
	public void setUserName(String Username) {
		this.username = Username;
	}
}
